package net.cz.wc.data;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class ResourceManager {
	
	public static void closeResultSet(ResultSet rst) {
		try {
			if (rst != null && !rst.isClosed()) {
				rst.close();
			}
		} catch (SQLException sqlEE) {
			//nothing to do here but to shape sonar complaints
		}
	}
	
	public static void closePreparedStatement(PreparedStatement stm) {
		try {
			if (stm != null && !stm.isClosed()) {
				stm.close();
			}
		} catch (SQLException sqlEE) {
			//nothing to do here but to shape sonar complaints
		}
	}
}
